﻿using Swimj.DomainLib.Entities;

namespace Production.DomainLib.AggregatesModel.ProcessAggregate
{
    public class Process : AuditableAggregateRoot<int>
    {
        public string? Code { get; set; }

        public string? Name { get; set; }

        public int? ProcessCategoryId { get; set; }

        public string? Description { get; set; }


        /// <summary>
        /// 排程逻辑顺序
        /// </summary>
        public int ScheduleSort { get; set; }

        /// <summary>
        /// 参考工序
        /// </summary>
        public string? ReferenceProcess { get; set; }

        /// <summary>
        /// 排程类型
        /// </summary>
        public int ScheduleType { get; set; }

        public Process(string? code, string? name, int? processCategoryId, string? description,
            int scheduleSort, string? referenceProcess, int scheduleType)
        {
            Code = code;
            Name = name;
            ProcessCategoryId = processCategoryId;
            Description = description;
            ScheduleSort = scheduleSort;
            ReferenceProcess = referenceProcess;
            ScheduleType = scheduleType;
        }

        public void Update(string? code, string? name, int? processCategoryId, string? description,
            int scheduleSort, string? referenceProcess, int scheduleType)
        {
            Code = code;
            Name = name;
            ProcessCategoryId = processCategoryId;
            Description = description;
            ScheduleSort = scheduleSort;
            ReferenceProcess = referenceProcess;
            ScheduleType = scheduleType;
        }

    }
}